package com.ruoyi.trainingManagement.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 课程排课详细信息对象 course_schedule_details
 * 
 * @author chenxl
 * @date 2025-06-18
 */
public class CourseScheduleDetails extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 班级ID */
    private String id;

    /** 开课班ID */
    @Excel(name = "开课班ID")
    private String trainingProgramCoursesId;

    /** 课程ID */
    @Excel(name = "课程ID")
    private String courseId;

    /** 培养方案ID */
    @Excel(name = "培养方案ID")
    private String trainingProgramId;

    /** 开课学期 */
    @Excel(name = "开课学期")
    private Long semester;

    /** 年级 */
    @Excel(name = "年级")
    private Long grade;

    @Excel(name = "学年")
    private Integer  academicYear;

    /** 班级名称 */
    @Excel(name = "班级名称")
    private String className;

    /** 关联行政班ID */
    @Excel(name = "关联行政班ID")
    private String administrativeClassId;

    /** 开课院系 */
    @Excel(name = "开课院系")
    private String department;

    /** 校区 */
    @Excel(name = "校区")
    private Long campus;

    /** 教室 */
    @Excel(name = "教室")
    private String classroom;

    /** 教师ID */
    @Excel(name = "教师ID")
    private String teacherId;

    /** 课次 */
    @Excel(name = "课次")
    private Integer lessonCount;

    /** 单双周 */
    @Excel(name = "单双周")
    private Integer weekType;

    /** 班级最大容量 */
    @Excel(name = "班级最大容量")
    private Long maxCapacity;

    /** 已选学生人数 */
    @Excel(name = "已选学生人数")
    private Long currentEnrollment;

    /** 班级状态 */
    @Excel(name = "班级状态")
    private Long status;

    /** 开课周期 */
    @Excel(name = "开课周期")
    private String coursePeriod;

    /** 教学方式 */
    @Excel(name = "教学方式")
    private Long teachingMode;

    /** 教学大纲文件路径 */
    @Excel(name = "教学大纲文件路径")
    private String syllabus;

    /** 是否已完成分班 */
    @Excel(name = "是否已完成分班")
    private Integer isClassAssigned;

    /** 课程类型 */
    @Excel(name = "课程类型")
    private Long courseType;

    /** 跨学期开设课程 */
    @Excel(name = "跨学期开设课程")
    private Long isCrossSemester;

    /** 是否班级满员 */
    @Excel(name = "是否班级满员")
    private Integer isFull;

    /** 是否排课完成 */
    @Excel(name = "是否排课完成")
    private Long isScheduleCompleted;

    /** 排课时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "排课时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date scheduledAt;

    /** 排课优先级 (1=高, 2=中, 3=低) */
    @Excel(name = "排课优先级 (1=高, 2=中, 3=低)")
    private Long schedulePriority;

    /** 班级介绍或备注 */
    @Excel(name = "班级介绍或备注")
    private String classDescription;

    /** 记录创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 记录更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /**添加isRequired**/
    @Excel(name = "是否必修")
    private Integer isRequired;

    /**开始周**/
    @Excel(name = "开始周")
    private Long startWeek;

    /**结束周**/
    @Excel(name = "结束周")
    private Long endWeek;

    /*教室类型room_type*/
    @Excel(name = "教室类型")
    private Long roomType;

//    录入成绩添加字段
    /** 成绩组成配置（JSON格式，如：[{"field":"regularScore","ratio":30}, ...]） */
    @Excel(name = "成绩组成配置")
    private String scoreConfig;  // 与数据库`score_config`字段对应

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }

    public void setTrainingProgramCoursesId(String trainingProgramCoursesId) 
    {
        this.trainingProgramCoursesId = trainingProgramCoursesId;
    }

    public String getTrainingProgramCoursesId() 
    {
        return trainingProgramCoursesId;
    }

    public void setCourseId(String courseId) 
    {
        this.courseId = courseId;
    }

    public String getCourseId() 
    {
        return courseId;
    }

    public void setTrainingProgramId(String trainingProgramId) 
    {
        this.trainingProgramId = trainingProgramId;
    }

    public String getTrainingProgramId() 
    {
        return trainingProgramId;
    }

    public void setSemester(Long semester) 
    {
        this.semester = semester;
    }

    public Long getSemester() 
    {
        return semester;
    }

    public void setGrade(Long grade) 
    {
        this.grade = grade;
    }

    public Long getGrade() 
    {
        return grade;
    }

    public void setAcademicYear(Integer academicYear) {
        this.academicYear = academicYear;
    }

    public Integer getAcademicYear() {
        return academicYear;
    }

    public void setClassName(String className) 
    {
        this.className = className;
    }

    public String getClassName() 
    {
        return className;
    }

    public void setAdministrativeClassId(String administrativeClassId) 
    {
        this.administrativeClassId = administrativeClassId;
    }

    public String getAdministrativeClassId() 
    {
        return administrativeClassId;
    }

    public void setDepartment(String department) 
    {
        this.department = department;
    }

    public String getDepartment() 
    {
        return department;
    }

    public void setCampus(Long campus)
    {
        this.campus = campus;
    }

    public Long getCampus()
    {
        return campus;
    }

    public void setClassroom(String classroom) 
    {
        this.classroom = classroom;
    }

    public String getClassroom() 
    {
        return classroom;
    }

    public void setTeacherId(String teacherId)
    {
        this.teacherId = teacherId;
    }

    public String getTeacherId()
    {
        return teacherId;
    }


    public void setMaxCapacity(Long maxCapacity) 
    {
        this.maxCapacity = maxCapacity;
    }

    public Long getMaxCapacity() 
    {
        return maxCapacity;
    }

    public void setCurrentEnrollment(Long currentEnrollment) 
    {
        this.currentEnrollment = currentEnrollment;
    }

    public Long getCurrentEnrollment() 
    {
        return currentEnrollment;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setCoursePeriod(String coursePeriod)
    {
        this.coursePeriod = coursePeriod;
    }

    public String getCoursePeriod()
    {
        return coursePeriod;
    }

    public void setTeachingMode(Long teachingMode) 
    {
        this.teachingMode = teachingMode;
    }

    public Long getTeachingMode() 
    {
        return teachingMode;
    }

    public void setSyllabus(String syllabus) 
    {
        this.syllabus = syllabus;
    }

    public String getSyllabus() 
    {
        return syllabus;
    }

    public void setIsClassAssigned(Integer isClassAssigned) 
    {
        this.isClassAssigned = isClassAssigned;
    }

    public Integer getIsClassAssigned() 
    {
        return isClassAssigned;
    }

    public void setCourseType(Long courseType) 
    {
        this.courseType = courseType;
    }

    public Long getCourseType() 
    {
        return courseType;
    }

    public void setIsCrossSemester(Long isCrossSemester) 
    {
        this.isCrossSemester = isCrossSemester;
    }

    public Long getIsCrossSemester() 
    {
        return isCrossSemester;
    }

    public void setIsFull(Integer isFull) 
    {
        this.isFull = isFull;
    }

    public Integer getIsFull() 
    {
        return isFull;
    }


    public void setScheduledAt(Date scheduledAt) 
    {
        this.scheduledAt = scheduledAt;
    }

    public Date getScheduledAt() 
    {
        return scheduledAt;
    }

    public void setSchedulePriority(Long schedulePriority) 
    {
        this.schedulePriority = schedulePriority;
    }

    public Long getSchedulePriority() 
    {
        return schedulePriority;
    }

    public void setClassDescription(String classDescription) 
    {
        this.classDescription = classDescription;
    }

    public String getClassDescription() 
    {
        return classDescription;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    /**完善isRequired**/
    public void setIsRequired(Integer isRequired) {
        this.isRequired = isRequired;
    }
    /**完善对应的get**/
    public Integer getIsRequired() {
        return isRequired;
    }

    public Integer getLessonCount() {
        return lessonCount;
    }

    public void setLessonCount(Integer lessonCount) {
        this.lessonCount = lessonCount;
    }

    public Integer getWeekType() {
        return weekType;
    }

    public void setWeekType(Integer weekType) {
        this.weekType = weekType;
    }

    public Long getStartWeek() {
        return startWeek;
    }

    public void setStartWeek(Long startWeek) {
        this.startWeek = startWeek;
    }

    public Long getEndWeek() {
        return endWeek;
    }

    public void setEndWeek(Long endWeek) {
        this.endWeek = endWeek;
    }

    // ========== 新增 Getter + Setter ==========
    public String getScoreConfig() {
        return scoreConfig;
    }
    public void setScoreConfig(String scoreConfig) {
        this.scoreConfig = scoreConfig;
    }

    public Long getRoomType() {
        return roomType;
    }

    public void setRoomType(Long roomType) {
        this.roomType = roomType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("trainingProgramCoursesId", getTrainingProgramCoursesId())
            .append("courseId", getCourseId())
            .append("trainingProgramId", getTrainingProgramId())
            .append("semester", getSemester())
            .append("grade", getGrade())
            .append("academicYear", getAcademicYear())
            .append("className", getClassName())
            .append("administrativeClassId", getAdministrativeClassId())
            .append("department", getDepartment())
            .append("campus", getCampus())
            .append("classroom", getClassroom())
            .append("teacherId", getTeacherId())
            .append("lessonCount", getLessonCount())
            .append("weekType", getWeekType())
            .append("maxCapacity", getMaxCapacity())
            .append("currentEnrollment", getCurrentEnrollment())
            .append("status", getStatus())
            .append("coursePeriod", getCoursePeriod())
            .append("teachingMode", getTeachingMode())
            .append("syllabus", getSyllabus())
            .append("isClassAssigned", getIsClassAssigned())
            .append("courseType", getCourseType())
            .append("isCrossSemester", getIsCrossSemester())
            .append("isFull", getIsFull())
            .append("isScheduleCompleted", getIsScheduleCompleted())
            .append("scheduledAt", getScheduledAt())
            .append("schedulePriority", getSchedulePriority())
            .append("classDescription", getClassDescription())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .append("isRequired", getIsRequired())
            .append("startWeek", getStartWeek())
            .append("endWeek", getEndWeek())
            .append("scoreConfig", getScoreConfig())
            .append("roomType", getRoomType())
            .toString();
    }


    public Long getIsScheduleCompleted() {
        return isScheduleCompleted;
    }

    public void setIsScheduleCompleted(Long isScheduleCompleted) {
        this.isScheduleCompleted = isScheduleCompleted;
    }
}
